<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>窗口滚动的距离</title>
		<style>
		 body{
			 height: 10000px;
			 width: 5000px;
		 }
		</style>
		<script>
		//滚动 的事件
		  window.onscroll=function(){
			  var d=document.getElementById("d1");
			  d1.innerHTML="X:"+document.documentElement.scrollTop+",Y="+document.documentElement.scrollLeft;
		  }
		</script>
	</head>
	<body>
		<div id="d1" style="position: fixed;">
			
		</div>
	</body>
</html>
